package com.ruoyi.business.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

/**
 * 库存分类对象 inventory_class
 *
 * @author liutietou
 * @since 1.0 2025-01-09
 */
@Entity
@Table(name = "inventoryclass")
@Data
public class InventoryClass extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 分类编码 */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "cinvccode")
    @Excel(name = "分类编码")
    private String  cinvccode;


    /** 分类名称 */
    @Excel(name = "分类名称")
    @Column(name = "cinvcname")
    private String  cinvcname;

    /** 父分类ID */
    @Excel(name = "上级分类")
    @Transient
    @JsonIgnore
    private InventoryClass    parent;

    @Transient
    List<InventoryClass> children;

    /** 分类级别 */
    @Excel(name = "级次")
    @Column(name = "iinvcgrade")
    private Integer iinvcgrade;

    @Excel(name = "是否末级", readConverterExp = "0=否,1=是")
    @Column(name = "binvcend")
    private Boolean   binvcend;




}